<template>
  <div class="blog-author">
    <img class="author-img" src="@/assets/author_card.jpg" />
    <div class="card-info">
      <img class="author-avatar" :src="authorAvatar" />
      <h2 class="author-info">zhenzhang</h2>
      <p class="concat-info">联系站长</p>
      <p class="concat-info">QQ: 1849306673</p>
      <p class="concat-info">电话: 18825797220</p>
      <p class="concat-info">邮箱: 1849306673@qq.com</p>
    </div>
  </div>
</template>

<script>
import { api } from "@/api";
export default {
  computed: {
    authorAvatar() {
      return (
        "/api/" + api.user.getAvatar("zhenzhang").url + `?${Math.random()}`
      );
    },
  },
};
</script>

<style lang="less" scoped>
.blog-author {
  width: 100%;
  height: 280px;
  position: relative;
  .author-img {
    margin-top: 16px;
    object-fit: cover;
    height: 100%;
    width: 100%;
    opacity: 0.5;
    border-radius: 4%;
  }
  .card-info {
    position: absolute;
    margin-top: 20px;
    width: 100%;
    min-height: 100px;
    left: 0;
    top: 0;
    .author-avatar {
      @media screen and (max-width: 800px) {
        opacity: 0;
      }
      position: inherit;
      left: 50%;
      margin-left: -50px;
      width: 100px;
      height: 100px;
      border-radius: 50%;
    }
    .author-info {
      margin-top: 110px;
      color: white;
      text-align: center;
    }
    .concat-info {
      text-align: center;
      font-weight: bold;
      margin: 5px;
    }
  }
}
</style>
